// 车险保费价目组件配置
 import { deepCopy } from '@/utils/tools'

const conf = [

    
    {
        label: '交强险保费',
        component: 'input',
        conf: {
            disabled: false,
        },
        key: 'jqPrice',
    },

    {
        label: '商业险保费',
        component: 'input',
        conf: {
            disabled: false,
        },
        key: 'syPrice'
    },
    {
        label: '车船税',
        component: 'input',
        conf: {
            disabled: false,
        },
        key: 'tax'
    },
    
]

const payment =  {
    label: '支付方式',
    component: 'selectGroup',
    key: 'payment',
    conf: {
        disabled: false,
        options: [

            {
                label: '创世纪支付',
                options: [
                    {
                        label: '现金',
                        value: 'csXj'
                    },
                    {
                        label: '转账',
                        value: 'csjZz'
                    },
                    {
                        label: '二维码支付',
                        value: 'csjCode'
                    }
                    
                ]
            },

            {
                label: '保险公司支付',
                options: [

                    {
                        label: '个人 (转账)',
                        value: 'bxGrZz'
                    },
                    {
                        label: '个人 (二维码)',
                        value: 'bxGrCode'
                    },
                    {
                        label: '公对公 (转账)',
                        value: 'bxGdgZz'
                    },
                    {
                        label: '公对公 (二维码)',
                        value: 'bxGdgCode'
                    },
                    
                ]
            }
            
            
        ]
    },
}


function getConf (haspayment:boolean = false){
    let cache = []; 

    conf.forEach(mod =>{
        cache.push(Object.assign(mod))
    })
    
    if(haspayment){
        cache.unshift(Object.assign(payment))
    }
    
    return deepCopy(cache)
}

 export default getConf   